﻿Imports System.Data.OleDb

Public Class LoaiNguoiDungDAO

    Public Function layTenNguoiDung() As DataTable
        Dim dt As New DataTable
        'B1 & B2: Tao chuoi ket noi, mo ket noi bang doi tuong ket noi
        Dim cn As OleDbConnection
        cn = DatabaseProvider.ConnectionData()
        'B3: Tao chuoi strSQL thao tac CSDL
        Dim sql As String = "select * from LoaiNguoiDung "
        Dim a As New OleDb.OleDbDataAdapter(sql, cn)
        a.Fill(dt)
        cn.Close()
        Return dt
    End Function

End Class
